import request from '@/utils/request'

// 查询缴费规则列表
export function listRule(query) {
    return request({
        url: '/server/rule/list',
        method: 'get',
        params: query
    })
}

// 查询缴费规则详细
export function getRule(ruleId) {
    return request({
        url: '/server/rule/' + ruleId,
        method: 'get'
    })
}

// 新增缴费规则
export function addRule(data) {
    return request({
        url: '/server/rule',
        method: 'post',
        data: data
    })
}

// 修改缴费规则
export function updateRule(data) {
    return request({
        url: '/server/rule',
        method: 'put',
        data: data
    })
}

// 删除缴费规则
export function delRule(ruleId) {
    return request({
        url: '/server/rule/' + ruleId,
        method: 'delete'
    })
}

// 导出缴费规则
export function exportRule(query) {
    return request({
        url: '/server/rule/export',
        method: 'get',
        params: query
    })
}
